getParcelableExtra

open fun <T> getParcelableExtra(@NonNull in: Intent, @Nullable name: String, @NonNull clazz: Class<T>): T(source)

Retrieve extended data from the intent.

Compatibility behavior:

  • SDK 34 and later, this method matches platform behavior.
  • SDK 33 and below, the object type is checked after deserialization.

Return

the value of an item previously added with putExtra(), or null if no Parcelable value was found.

Parameters

in

The intent to retrieve from.

name

The name of the desired item.

clazz

The type of the object expected.

See also